home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98b.txt / 000045_icon-group-sender _Mon Jun 1 09:05:23 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.8.8/8.8.7) with SMTP id JAA02631
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Mon, 1 Jun 1998 09:05:22 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA06428; Mon, 1 Jun 1998 09:05:16 -0700
  7. Date: Fri, 29 May 98 22:28:40 -0400
  8. Message-Id: <9805300228.AA0191@valinet.com>
  9. From: Paul Abrahams <abrahams@acm.org>
  10. To: jeffery@cs.utsa.edu
  11. Cc: icon-group@optima.CS.Arizona.EDU
  12. In-Reply-To: <199805231524.KAA05320@segfault.cs.utsa.edu> (message from
  13.     Clinton Jeffery on Sat, 23 May 1998 10:24:33 -0500)
  14. Subject: Re: Annoying things
  15. Reply-To: abrahams@acm.org
  16. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  17. Status: RO
  18. Content-Length: 1627
  19.  
  20. >>>>> On Sat, 23 May 1998 10:24:33 -0500, Clinton Jeffery <jeffery@segfault.cs.utsa.edu> said:
  21.  
  22. |vladimir> [open(dirname) gives a file that returns a directory's
  23. |vladimir> filenames, one per line] Thanks for the suggestion, it works!
  24. |vladimir> You should however mention it in the Icon reference otherwise
  25. |vladimir> we can only guess... Are there some other "undocumented"
  26. |vladimir> features like with Microsoft? :-)
  27.  
  28. |Clint> Oops.  Well, at least I release the source code.  :-)
  29.  
  30. |Clint> Actually, the reason that directory reading is not yet
  31. |Clint> documented is that it is likely to change.  For these kind of
  32. |Clint> operating system interactions whatever I implement and document
  33. |Clint> needs to be consistent with Shamim Mohamed's POSIX interface for
  34. |Clint> Icon, Unicon.  His interface supports open(dirname) but
  35. |Clint> specifies more complete file information returned for each
  36. |Clint> directory entry, such as permissions, ownership, and timestamps.
  37. |Clint> Prior to this I had made open(dirname) simpler, and some
  38. |Clint> graduate students of mine had implemented a separate function
  39. |Clint> for such file attributes, fattrib().  He and I need to talk
  40. |Clint> about it a bit more, but I am likely to adopt his semantics for
  41. |Clint> the lines returned by open(dirname).
  42.  
  43. Given the variances among operating systems, perhaps there ought to be a
  44. convention that the first space-delimited item in each line produced by
  45. open(dirname) is the filename.
  46.  
  47. This does seem close to my earlier suggestion that reading a directory
  48. should act as a generator of the filenames within the directory.
  49.  
  50. Paul (Paul Abrahams)
  51.  
  52.  
  53.  
  54.